package com.daxt.model.dic;

/**
 * 登录模式
 *
 */
public enum LoginPattern {

	SSO("SSO","单点登录"), //单点登录  cas
	USERPASS("USERPASS","用户密码登录") //
	;

	private String key;
	private String value;

	private LoginPattern(String key, String value) {
		this.key = key;
		this.value = value;
	}
	
	public String getKey() {
		return key;
	}

	public void setKey(String key) {
		this.key = key;
	}

	public String getValue() {
		return value;
	}

	public void setValue(String value) {
		this.value = value;
	}

	

	public static boolean hasKey(String key) {
		LoginPattern[] values = LoginPattern.values();
		for (LoginPattern type : values) {
			if(type.name().equals(key)) {
				return true;
			}
		}
		return false;
	}
}
